#include <stdio.h>
#include <stdlib.h>

void Bubble_sort(int data[], int len)
{
	int i,j;
	int tmp;
	if(data == NULL || len == 0)
		return;
	for(i = 0;i < len-1;i++)
		for(j = 0;j < len - i - 1;j++ ) {
			if(data[j] > data[j+1]){
				tmp = data[j];
				data[j] = data[j+1];
				data[j+1] = tmp;
			}
		} 

}

int main()
{
	int i;
	int data[] = {2,3,6,1,0,8};
	Bubble_sort(data, 6);
	printf("data is:");
	for(i = 0;i<6;i++)
		printf("%d ", data[i]);
	printf("\n");
	return 0;
}